package com.bao.system.service;

import com.bao.system.entity.BUser;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author bao
 * @since 2021-06-03
 */
@Service
public interface UserService extends IService<BUser> {

    public List<BUser> allUsers();
    BUser getUserById(Long id);

    IPage<BUser> findUserPage(Page<BUser> page, @Param(Constants.WRAPPER) QueryWrapper<BUser> wrapper);

    void editUser(Long id, Integer status);

    void editUserDep(Long id, Long departmentId);

    void deleUser(Long id);

    BUser login(String username, String password);
}
